import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '拨款批次',
    align: "center",
    dataIndex: 'fundsId_dictText'
  },
  {
    title: '补偿款类型',
    align: "center",
    dataIndex: 'chargeTypeId_dictText'
  },
  {
    title: '预算总额',
    align: "center",
    dataIndex: 'budgetTotalCharge'
  },
  {
    title: '已拨金额',
    align: "center",
    dataIndex: 'fundedCharge'
  },
  {
    title: '本次拨付',
    align: "center",
    dataIndex: 'charge'
  },
  {
    title: '欠拨金额',
    align: "center",
    dataIndex: 'debtCharge'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '拨款批次',
    field: 'fundsId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "project_funds,funds_name,funds_name"
    },
  },
  {
    label: '补偿款类型',
    field: 'chargeTypeId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "charge_type_id"
    },
  },
  {
    label: '预算总额',
    field: 'budgetTotalCharge',
    component: 'Input',
  },
  {
    label: '已拨金额',
    field: 'fundedCharge',
    component: 'Input',
  },
  {
    label: '本次拨付',
    field: 'charge',
    component: 'Input',
  },
  {
    label: '欠拨金额',
    field: 'debtCharge',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
